// apis/user.js
// 引入网络请求模块
import { uniFetch } from './uni-fetch'
import {rsaEncrypt} from '@/utils/rsa'
// 微信小程序登录
export const login = (data) => uniFetch({url:'/memberLogin/miniAppLogin',method:'POST',data});
// 获取会员信息
export function getMemberInfo(data){
  return uniFetch({
    url:'/member/getMemberInfo',
    method:'get',
    data,
  })
}
// 退出登录
export const loginOut = (data) => uniFetch({url:'/logout',method:'POST'});

// 获取协议
export function getAgreement() {
  return uniFetch({
    url: '/sysDynamicText/selectSysSettingByKey',
    method: 'get',
    data: {
      textKey: 'AGREEMENT'
    }
  })
}